@extends('admin.base.widgets')

@section('content')
<div id="mws-container" class="clearfix"> 
<div class="container">
    <div class='block-area'>
        <h3 class="block-title">&nbsp;&nbsp;&nbsp;&nbsp;修改商品</h3>
            @if (count($errors) > 0)
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>&nbsp;&nbsp;&nbsp;{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif
            <div class="alert alert-danger">
                <ul>
                   
                </ul>
            </div>
        <form action='{{ url("goods/".$list->GoodsId) }}' method='post' enctype='multipart/form-data'>
            {{ csrf_field() }}
            {{ method_field('PUT') }}
            <div class='row'>
                <div class="col-lg-4">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品名:&nbsp;&nbsp;&nbsp;<input name='GoodsName' class="form-control m-b-10" value="{{ $list->GoodsName }}" type="text">        
                </div>
                <br />
                <div class="col-lg-4">
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品标题:&nbsp;&nbsp;&nbsp;<input name='GoodsTitle' class="form-control m-b-10" value="{{ $list->GoodsTitle }}" type="text">
                </div>
                <br />
                <div class="col-lg-4">
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品类别:&nbsp;&nbsp;
                     <select name="GoodsType">
                         @foreach ($data as $v)
                            @if(strlen($v->SortPath) == 3)
                           <option value="{{ $v->SortPath.'-'.$v->SortId }}">{{ $v->SortName }}</option>
                            @endif
                         @endforeach
                     </select>
                </div>
                <br />
                <div>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品图片:
                    <div id="filestyle"><input type="file" name="GoodsPic" /></div>
                </div>
                <br />
                <img src="{{ '/uploads/'.$list->GoodsPic }}" id="goodsimg" />
                <div class="col-lg-4">
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品价格:&nbsp;&nbsp;&nbsp;<input name='GoodsPrice' class="form-control m-b-10" value="{{ $list->GoodsPrice }}" type="text">
                </div>
                <br />
                <div class="col-lg-4">
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品库存:&nbsp;&nbsp;&nbsp;<input name='GoodsStore' class="form-control m-b-10" value="{{ $list->GoodsStore }}" type="text">
                </div>
                <br />
                <div class="col-lg-4">
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品介绍:&nbsp;&nbsp;&nbsp;<input name='GoodsPresent' class="form-control m-b-10" value="{{ $list->GoodsPresent }}" type="text">
                </div>
                <br />
                <div class="col-lg-4">
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品状态:
                     <input name='GoodsCycle' type="radio" value="0" @if($list->GoodsCycle == 0)checked @endif>还原
                     <input name='GoodsCycle' type="radio" value="1" @if($list->GoodsCycle == 1)checked @endif>放入回收站
                </div>
                <br />
                <div class="col-lg-4">
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商家名称:&nbsp;&nbsp;&nbsp;<input name='GoodsMerchant' class="form-control m-b-10" value="{{ $list->GoodsMerchant }}" type="text">
                </div>
                <br />
                <div class="col-lg-4">
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品详情:&nbsp;&nbsp;&nbsp;<input name='GoodsDetail' class="form-control m-b-10" value="{{ $list->GoodsDetail }}" type="text">
                </div>
                <br />
                <div >
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品销量:&nbsp;&nbsp;&nbsp;<input name='GoodsSales' class="form-control m-b-10" value="{{ $list->GoodsSales }}" type="text">
                </div>
                <br />
                <div>
                    <div>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='submit' class='btn' value='修改'>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
</div>
@endsection